package com.nuatar.meibi;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class MsgShow extends FatherActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_msg_show);
		MeiBi mks=(MeiBi) this.getApplication();
		TextView tv=(TextView) findViewById(R.id.MsgTime);
		EditText et=(EditText) findViewById(R.id.MsgInfo);
		Button btn=(Button) findViewById(R.id.MsgBackbtn);
		SimpleDateFormat sdf=new SimpleDateFormat("yyyyMMddHHmmss");
		SimpleDateFormat sdf1=new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
		try {
			Date dt=sdf.parse(mks.Msg.time);
			tv.setText("发送时间:"+sdf1.format(dt));
			et.setText(mks.Msg.info);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		btn.setOnClickListener(new OnClickListener(){

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				finish();
			}});
	}
	@Override
	protected void onStart() {
		super.onStart();
		mGaTracker.sendView(this.toString());
	}


}
